<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="UTF-8">
	<title>百朋后台管理系统</title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/demo.css">
	<script type="text/javascript" src="__PUBLIC__/easyui/jquery.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/easyui/jquery.easyui.min.js"></script>
</head>
<body>
	<div class="invest_table">
		<table id="default_table" title="订单列表" style="width:100%;min-height:372px;"
			data-options="
				fitColumns:true,
				showFooter:true,
				rowStyler:function(value,row,index){
					if (row.fac_simple_name == '未还本金:'){
						return 'background-color:#e0ecff;color:#black;font-weight:bold;';
					}
				},
				rownumbers:true,
				singleSelect:true,
				autoRowHeight:false,
				url:'../../borrow/borrowforecast/borrowforecast_main',
				pagination:true,
				pageSize:10,toolbar:'#tb'
			"
		>
			<thead>
				<tr>
					<th field="binfo_borrowid" width="10%" align="center" sortable="true">借款编号</th>
					<th field="fac_simple_name" width="10%" align="center">商户简称</th>
					<th field="cust_name" width="9%" align="center">客户姓名</th>
					<th field="fund_balance" width="6%" align="center">账户余额</th>
					<th field="period_number" width="5%" align="center">期数</th>
                    <th field="remain_time" width="5%" align="center">剩余期数</th>
					<th field="start_date" width="10%" align="center">起始时间</th>
					<th field="end_date" width="10%" align="center" sortable="true">还款日</th>
					<th field="principal" width="8%" align="center">本金</th>
					<th field="interest" width="8%" align="center">利息</th>
					<th field="poundage" width="8%" align="center">手续费</th>
					<th field="repay_date" width="10%" align="center">状态</th>
				</tr>
			</thead>
		</table>
	</div>
	<div id="tb" style="padding:5px;height:auto">
		<form action="../../borrow/borrowforecast/borrowforecast_list" method="post" id="searchTable">
			<div>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<a href="javascript:;" onclick="submitSearch(7);" class="easyui-linkbutton" iconCls="icon-search">7天时间</a>&nbsp;&nbsp;
				<a href="javascript:;" onclick="submitSearch(15);" class="easyui-linkbutton" iconCls="icon-search">15天时间</a>&nbsp;&nbsp;
				<a href="javascript:;" onclick="submitSearch(30);" class="easyui-linkbutton" iconCls="icon-search">30天时间</a>&nbsp;&nbsp;&nbsp;&nbsp;
				自定义查询
				<input class="easyui-textbox" id="select_days" name="select_days" value="{$search_array.select_days}" style="width:100px">  天&nbsp;&nbsp;
				<a href="javascript:;" onclick="submitSearch(0);" class="easyui-linkbutton" iconCls="icon-search">查询</a>
			</div>
		</form>
	</div>

	<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript">
		$(function() 
		{
//			var json = '{$json_list}';
//			var array = JSON.parse(json);
//			$('#invest_table').datagrid({loadFilter:pagerFilter}).datagrid('loadData', array);
            $("#default_table").datagrid();
		});

		function submitSearch(days) 
		{
			if (days == 0)
			{
                days=$("#select_days").val();
			}
            $('#default_table').datagrid('load',{
                select_days: days
            });
		}


	</script>
</body>
</html>